package o;

import o.eh.d;

public class eo {
    private ev ʻ = new ev(this);
    private b ʼ = b.NONE;
    private c ʽ = c.RELAXED;
    public int ˊ = 0;
    eo ˋ;
    final el ˎ;
    final a ˏ;
    int ॱ = -1;
    private int ॱॱ = 0;
    eh ᐝ;

    public enum a {
        NONE,
        LEFT,
        TOP,
        RIGHT,
        BOTTOM,
        BASELINE,
        CENTER,
        CENTER_X,
        CENTER_Y
    }

    public enum b {
        NONE,
        STRONG,
        WEAK
    }

    public enum c {
        RELAXED,
        STRICT
    }

    public ev ˎ() {
        return this.ʻ;
    }

    public eo(el elVar, a aVar) {
        this.ˎ = elVar;
        this.ˏ = aVar;
    }

    public eh ˋ() {
        return this.ᐝ;
    }

    public void ˎ(ee eeVar) {
        if (this.ᐝ == null) {
            this.ᐝ = new eh(d.UNRESTRICTED, null);
        } else {
            this.ᐝ.ˎ();
        }
    }

    public el ˊ() {
        return this.ˎ;
    }

    public a ॱ() {
        return this.ˏ;
    }

    public int ˏ() {
        if (this.ˎ.ˊॱ() == 8) {
            return 0;
        }
        if (this.ॱ <= -1 || this.ˋ == null || this.ˋ.ˎ.ˊॱ() != 8) {
            return this.ˊ;
        }
        return this.ॱ;
    }

    public b ॱॱ() {
        return this.ʼ;
    }

    public eo ʻ() {
        return this.ˋ;
    }

    public int ʼ() {
        return this.ॱॱ;
    }

    public void ʽ() {
        this.ˋ = null;
        this.ˊ = 0;
        this.ॱ = -1;
        this.ʼ = b.STRONG;
        this.ॱॱ = 0;
        this.ʽ = c.RELAXED;
        this.ʻ.ॱ();
    }

    public boolean ˊ(eo eoVar, int i, b bVar, int i2) {
        return ˊ(eoVar, i, -1, bVar, i2, false);
    }

    public boolean ˊ(eo eoVar, int i, int i2, b bVar, int i3, boolean z) {
        if (eoVar == null) {
            this.ˋ = null;
            this.ˊ = 0;
            this.ॱ = -1;
            this.ʼ = b.NONE;
            this.ॱॱ = 2;
            return true;
        } else if (!z && !ˏ(eoVar)) {
            return false;
        } else {
            this.ˋ = eoVar;
            if (i > 0) {
                this.ˊ = i;
            } else {
                this.ˊ = 0;
            }
            this.ॱ = i2;
            this.ʼ = bVar;
            this.ॱॱ = i3;
            return true;
        }
    }

    public boolean ᐝ() {
        return this.ˋ != null;
    }

    public boolean ˏ(eo eoVar) {
        boolean z = true;
        if (eoVar == null) {
            return false;
        }
        a ॱ = eoVar.ॱ();
        if (ॱ != this.ˏ) {
            boolean z2;
            switch (this.ˏ) {
                case CENTER:
                    if (ॱ == a.BASELINE || ॱ == a.CENTER_X || ॱ == a.CENTER_Y) {
                        z = false;
                    }
                    return z;
                case LEFT:
                case RIGHT:
                    if (ॱ == a.LEFT || ॱ == a.RIGHT) {
                        z2 = true;
                    } else {
                        z2 = false;
                    }
                    if (eoVar.ˊ() instanceof ep) {
                        if (z2 || ॱ == a.CENTER_X) {
                            return true;
                        }
                        return false;
                    }
                    break;
                case TOP:
                case BOTTOM:
                    if (ॱ == a.TOP || ॱ == a.BOTTOM) {
                        z2 = true;
                    } else {
                        z2 = false;
                    }
                    if (eoVar.ˊ() instanceof ep) {
                        if (z2 || ॱ == a.CENTER_Y) {
                            return true;
                        }
                        return false;
                    }
                    break;
                case BASELINE:
                case CENTER_X:
                case CENTER_Y:
                case NONE:
                    return false;
                default:
                    throw new AssertionError(this.ˏ.name());
            }
            return z2;
        } else if (this.ˏ != a.BASELINE || (eoVar.ˊ().ˊˊ() && ˊ().ˊˊ())) {
            return true;
        } else {
            return false;
        }
    }

    public String toString() {
        return this.ˎ.ˏॱ() + ":" + this.ˏ.toString();
    }
}
